package retrofit.boot.client;

import org.slf4j.LoggerFactory;
import retrofit.RestAdapter;

/**
 * Created by wulg on 2019/11/13
 * description:
 */
public class RetrofitLogger implements RestAdapter.Log {

    private final org.slf4j.Logger logger;

    public RetrofitLogger(Class<?> clazz) {
        logger = LoggerFactory.getLogger(clazz);
    }

    @Override
    public void log(String message) {
        if (this.logger.isDebugEnabled()) {
            this.logger.debug(message);
        }
    }
}
